import Vue from "vue"
import VueRouter from "vue-router"
import discover from "../views/discover.vue"
import my from "../views/my.vue"
import friend from "../views/friend.vue"
import notFound from "../views/404NotFound.vue"
Vue.use(VueRouter)

const routes = [
  //默认第一个页面
  { path: "/", redirect: "/discover" },
  { path: "/discover", component: discover },
  { path: "/my", component: my },
  { path: "/friend", component: friend },
  { path: "*", component: notFound },
]

const router = new VueRouter({
  routes,
  // mode: "history",
})

export default router
